package com.jiangyao.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * <p>
 * 班级学期课程
 * </p>
 *
 * @author xiangyan
 * @since 2020-08-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@NoArgsConstructor
public class ClassSubject extends Model<ClassSubject> {

    private static final long serialVersionUID = 6559041753568098973L;
    /**
     * 学期课程ID
     */
    @TableId(value = "clsub_id", type = IdType.AUTO)
    @ApiModelProperty(value ="学期课程ID")
    private Integer clsubId;

    /**
     * 归属组织ID
     */
    private Integer orgId;

    /**
     * 班级id
     */
    private Integer classId;

    /**
     * 学期ID
     */
    @ApiModelProperty(value ="学期ID")
    private Integer semesterId;

    /**
     * 类型 1课堂教学 2线上课程
     */
    @ApiModelProperty(value ="类型 1课堂教学 2线上课程")
    private Integer type;

    /**
     * 课程ID
     */
    @ApiModelProperty(value ="课程ID")
    private Integer subjectId;

    /**
     * 课程名称
     */
    @ApiModelProperty(value ="课程名称")
    private String subjectName;

    /**
     * 学习状态 1待学习 2学习中 3已学习
     */
    @ApiModelProperty(value ="学习状态 1待学习 2学习中 3已学习")
    private Integer learnStatus;

    /**
     * 生成时间
     */
    private Date createTime;

    /**
     * 创建人
     */
    private Integer createAdminId;

    /**
     * 状态 1启用 0 关闭
     */
    private Integer status;

    /**
     * 排序
     */
    @ApiModelProperty(value ="排序")
    private Integer sortOrder;

    /**
     * 学分
     */
    @ApiModelProperty(value ="学分（暂时无用）")
    private Integer credit;

    @Override
    protected Serializable pkVal() {
        return this.clsubId;
    }

    public ClassSubject(Integer orgId, Integer classId, Integer semesterId, Integer type) {
        this.orgId = orgId;
        this.classId = classId;
        this.semesterId = semesterId;
        this.type = type;
    }
}
